package com.zmn.plat.common.dto.expressage;

import java.io.Serializable;
import java.util.List;

/**
 * 快递
 *
 * @author quanjic
 * @version v1.0
 * @since 2018/11/26 21:23
 **/
@Deprecated
public class ExpressageDRO implements Serializable {


    /**
     * 快递公司
     */
    private String company;

    /**
     * 快递单号
     */
    private String code;

    /**
     * 状态：0在途中、1已揽收、2疑难、3已签收、4退签、5同城派送中、6退回、7转单等
     */
    private Integer state;

    private List<ExpressageEntryDRO> list;

    /**
     * @return 啄木鸟中文状态
     */
    public String getZmnState() {
        if (state == null) {
            return null;
        }
        String result = null;
        switch (state) {
            case 1:
                result = "已揽件";
                break;
            case 0:
            case 10:
            case 11:
            case 12:
            case 13:
                result = "运输中";
                break;
            case 5:
            case 7:
                result = "派件中";
                break;
            case 3:
                result = "已签收";
                break;
            case 14:
                result = "签收失败";
                break;
            case 6:
                result = "退回";
                break;
            case 2:
            case 4:
                result = "异常";
                break;
            default:
                result = null;
        }
        return result;

    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public List<ExpressageEntryDRO> getList() {
        return list;
    }

    public void setList(List<ExpressageEntryDRO> list) {
        this.list = list;
    }

}
